package com.aikon.wht.innerclass;

public class Outter {
	
	private Integer fieldOfOuter;
	
	private static String staticString = "I'm the static String";

	public void method1() {
		new Inner1();
	}


	private class Inner1{
		public Inner1() {
			System.out.println("this is inner1");
		}
	}
	
	/**
	 * @return the staticString
	 */
	public static String getStaticString() {
		return staticString;
	}

	/**
	 * @param staticString the staticString to set
	 */
	public static void setStaticString(String staticString) {
		Outter.staticString = staticString;
	}

	/**
	 * @return the fieldOfOuter1
	 */
	public Integer getFieldOfOuter() {
		return fieldOfOuter;
	}

	/**
	 * @param fieldOfOuter1 the fieldOfOuter1 to set
	 */
	public void setFieldOfOuter(Integer fieldOfOuter) {
		this.fieldOfOuter = fieldOfOuter;
	}

	
	public static void main(String[] args){
		Outter outter = new Outter();
		outter.setFieldOfOuter(57);
		Inner inner = outter.new Inner();
		inner.methodOfInner();
		Outter.staticInner staticInner = new Outter.staticInner();
		staticInner.methodOfInner();
		
		
//		System.out.println("xx");
	}

	class Inner extends FatherOfInner{
		
		public void methodOfInner(){
			
			System.out.println(Outter.this.getFieldOfOuter());
			System.out.println(Outter.this.fieldOfOuter);
			super.setFieldOfFatherOfInner("I'm setted.");
			System.out.println(super.getFieldOfFatherOfInner());
			
		}
		
	}
	
	static class staticInner {
		
		public void methodOfInner(){
			System.out.println(staticString);
		}
	}
	
}
